<!-- HTML header for doxygen 1.8.5-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<title>GenAVB/TSN: GenAVB Configuration</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="http://www.freescale.com/files/abstract/misc/COLLATERALTEMPLATE_infocenter.js" type="text/javascript" xml:space="preserve"><!-- --></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="html_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">GenAVB/TSN
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('genavb_config.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">GenAVB Configuration </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The GenAVB stack is configured at startup through different configuration files.</p>
<hr  />
<h1><a class="anchor" id="autotoc_md101"></a>
Main Configuration</h1>
<p>The main parameters are defined in the /etc/genavb/config file.</p>
<h3><a class="anchor" id="autotoc_md102"></a>
Configuration profile</h3>
<p>A configuration profile is made of a pair of configuration files.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range </th><th class="markdownTableHeadLeft">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">APPS_CFG_FILE </td><td class="markdownTableBodyLeft">Text string (default "/etc/genavb/apps-listener-alsa.cfg") </td><td class="markdownTableBodyLeft">Points to a apps-*.cfg file containing a demo configuration (media apps to use, controller option...). It is parsed by the startup script avb.sh  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GENAVB_CFG_FILE </td><td class="markdownTableBodyLeft">Text string (default "/etc/genavb/genavb-listener.cfg") </td><td class="markdownTableBodyLeft">Points to a genavb-*.cfg file containing the configuration of the AVB stack, and is parsed by the avb application.  </td></tr>
</table>
<p>There are several pre-defined profiles, which can be used to set the role and behavior of the AVB node. Set these parameters according to the description of each demo preparation steps.</p>
<h3><a class="anchor" id="autotoc_md103"></a>
Auto start</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_AUTO_START </td><td class="markdownTableBodyLeft">0 or 1 (default 1)  </td></tr>
</table>
<p>Set to 1 to start the AVB stack automatically at system startup time. Set to 0 will require starting the AVB stack manually (# avb.sh start).</p>
<h3><a class="anchor" id="autotoc_md104"></a>
Setting system clock to be gPTP-based</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_USE_PHC2SYS </td><td class="markdownTableBodyLeft">0 or 1 (default 1)  </td></tr>
</table>
<p>Set this parameter to 1 in order to base the system clock on gPTP time. This will ensure that applications (like gstreamer) using the system clock have their process gPTP-based.</p>
<hr  />
<h1><a class="anchor" id="autotoc_md106"></a>
Application profile parameters</h1>
<p>The profile parameters are defined in the apps-*.cfg files of the /etc/genavb/ directory. Several profiles are already defined, targeted to suit example usage scenarii. The meaning of the parameters is as follows:</p>
<h3><a class="anchor" id="autotoc_md107"></a>
Fast connect mode</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_FAST_CONNECT_BTB </td><td class="markdownTableBodyLeft">0 or 1 (default 0)  </td></tr>
</table>
<p>If this parameter is set to 0, the AVB entity is expected to establish AVB connection upon external AVDECC controller exchanges. Set this parameter to 1 on a listener entity to enable the fast-connect back-to-back mode. When enabled the AVB entity will connect to the first talker advertised on the network. This mode is recommended in back-to-back setup, where no external controller is present. The other (talker) entity shouldn't have this mode enabled.</p>
<h3><a class="anchor" id="autotoc_md108"></a>
Defining a media application</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_EXTERNAL_MEDIA_APP </td><td class="markdownTableBodyLeft">Text string (default alsa-audio-app)  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">CFG_EXTERNAL_MEDIA_APP_OPT </td><td class="markdownTableBodyLeft">Text string in double quotes (default "")  </td></tr>
</table>
<p>These parameters indicate the name of the media application binary to be loaded along with the AVB stack, and its associated input parameters. The media application binary must be present in the file system of the target under the /usr/bin repository. The application name must be specified as absolute path or be in the default PATH.</p>
<h3><a class="anchor" id="autotoc_md109"></a>
Defining a controller application</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_CONTROLLER_APP </td><td class="markdownTableBodyLeft">Text string (default genavb-gui-controller)  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">CFG_CONTROLLER_APP_OPT </td><td class="markdownTableBodyLeft">Text string in double quotes (default "")  </td></tr>
</table>
<p>These parameters indicate the name of the controller application binary to be loaded along with the AVB stack, and its associated input parameters. The controller application binary must be present in the file system of the target under the /usr/bin repository, and be executable. The application name must be specified as absolute path or be in the default PATH.</p>
<h3><a class="anchor" id="autotoc_md110"></a>
Custom controller parameters</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_CONTROLLER_FB </td><td class="markdownTableBodyLeft">Text string in double quotes  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">CFG_CONTROLLER_FBSET_OPT </td><td class="markdownTableBodyLeft">Text string in double quotes  </td></tr>
</table>
<p>These parameters are options used by the genavb-gui-controller example application, to define the frame buffer type and related options used for the GUI composition.</p>
<h3><a class="anchor" id="autotoc_md111"></a>
Defining a control application</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadLeft">Format &amp; Range  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CFG_USE_EXTERNAL_CONTROLS </td><td class="markdownTableBodyLeft">0 or 1 (default 0)  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">CFG_EXTERNAL_CONTROLS_APP </td><td class="markdownTableBodyLeft">Text string (default genavb-controls-app)  </td></tr>
</table>
<p>These parameters enable and indicate the name of the control application binary to be loaded along with the AVB stack. Set this parameter to 1 and specify the control application name to enable such application type to handle AECP controls commands such as volume control from the other entity. The control application binary must be present in the file system of the target under the /usr/bin repository. The application name must be specified as absolute path or be in the default PATH.</p>
<hr  />
<h1><a class="anchor" id="autotoc_md113"></a>
GenAVB stack profile parameters</h1>
<p>The stack parameters are defined in the genavb-*.cfg files of the /etc/genavb/ directory. Several profiles are already defined, targeted to suit example usage scenarii. Cfg files are organized by sections (noted [XXX]), containing several key/value pairs.</p>
<p>Use # to comment lines. When a section or key/value pair is missing in the cfg file, default values will be used. The meaning of the section and keys is as follows:</p>
<h3><a class="anchor" id="autotoc_md114"></a>
Section [AVB_GENERAL]</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Key </th><th class="markdownTableHeadLeft">Value &amp; Range </th><th class="markdownTableHeadLeft">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">log_level </td><td class="markdownTableBodyLeft">Text string. Can be 'crit', 'err', 'init', 'info', 'dbg'. (default: info) </td><td class="markdownTableBodyLeft">Sets log level for all stack components  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">disable_component_log </td><td class="markdownTableBodyLeft">Text string: 'avtp', 'avdecc', 'srp', 'gptp', 'common', 'os', 'api', or 'none'. (default : none) </td><td class="markdownTableBodyLeft">Disable log for one or more components. Use a comma separated list to specify several components, eg: disable_component_log = avtp, avdecc  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">log_monotonic </td><td class="markdownTableBodyLeft">Text string: 'disabled' or 'enabled'. (default: disabled) </td><td class="markdownTableBodyLeft">Controls if monotonic timestamps are included in the logs output  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">sr_class_enabled </td><td class="markdownTableBodyLeft">Text string: Can be 'A', 'B', 'C', 'D' or 'E'. (default: A,B) </td><td class="markdownTableBodyLeft">Select enabled SR classes, must be 2 different classes separated by a comma (order has no impact as alphabetical order will be applied)  </td></tr>
</table>
<h3><a class="anchor" id="autotoc_md115"></a>
Section [AVB_AVDECC]</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Key </th><th class="markdownTableHeadLeft">Value &amp; Range </th><th class="markdownTableHeadLeft">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">enabled </td><td class="markdownTableBodyLeft">0 or 1 (default 1) </td><td class="markdownTableBodyLeft">Enables AVDECC stack component. If disabled, all other [AVB_AVDECC_xxx] sections parameters are unusued and the media application is responsible for stream creation/destruction, as well as MSRP stream declaration. 0 - disabled, 1 - enabled.  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">srp_enabled </td><td class="markdownTableBodyLeft">0 or 1 (default 1) </td><td class="markdownTableBodyLeft">Enables SRP API's to be called directly from AVDECC stack component (and stream reservations to be declared/redrawn by AVDECC/ACMP as streams are connected/disconnected). If disabled the media application is responsible for handling stream reservations. 0 - disabled, 1 - enabled.  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">fast_connect </td><td class="markdownTableBodyLeft">0 or 1 (default 0) </td><td class="markdownTableBodyLeft">Enables fast connect mode (Listener entity will connect streams automatically, based on saved talker information). 0 - disabled, 1 - enabled.  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">btb_demo_mode </td><td class="markdownTableBodyLeft">0 or 1 (default 0) </td><td class="markdownTableBodyLeft">Back to back demo mode: 0 - disabled, 1 - enabled, default: disabled. When enabled this entity will connect to the first talker advertised on the network. This is a demo mode (the other entity shouldn't have this mode enabled). This will force fast_connect to 1. 0 - disabled, 1 - enabled.  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">association_id </td><td class="markdownTableBodyLeft">Unsigned, 64 bits (default 0) </td><td class="markdownTableBodyLeft">Association ID to advertise for the local entities (see custom AEM parameters below).  </td></tr>
</table>
<h3><a class="anchor" id="autotoc_md116"></a>
Section [AVB_AVDECC_ENTITY_1]</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Key </th><th class="markdownTableHeadLeft">Value &amp; Range </th><th class="markdownTableHeadLeft">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">entity_id </td><td class="markdownTableBodyLeft">&lt;id&gt;. &lt;id&gt; is unsigned, 64bits (default: 0) </td><td class="markdownTableBodyLeft">ID of the entity (see custom AEM parameters below). This is a EUI-64 identifier unique to the entity.  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">entity_file </td><td class="markdownTableBodyLeft">Text string. Format: /etc/genavb/&lt;file_name&gt;.aem </td><td class="markdownTableBodyLeft">File to be used as AVDECC AEM entity description. There are several pre-defined descriptions, which can be used to set the capabilities of the AVB node. Default : none. See chapter 4 below for more details about AEM entities.  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">talker_entity_id_list </td><td class="markdownTableBodyLeft">&lt;id&gt;[,&lt;id&gt;,&lt;id&gt;]. &lt;id&gt; is unsigned, 64 bits (default : none) </td><td class="markdownTableBodyLeft">Talker entity ID list. Used only in fast-connect mode.  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">talker_unique_id_list </td><td class="markdownTableBodyLeft">&lt;id&gt;[,&lt;id&gt;,&lt;id&gt;]. &lt;id&gt; is unsigned, 16 bits (default : none) </td><td class="markdownTableBodyLeft">Talker unique ID list. Used only in fast-connect mode.  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">listener_unique_id_list </td><td class="markdownTableBodyLeft">&lt;id&gt;[,&lt;id&gt;,&lt;id&gt;]. &lt;id&gt; is unsigned, 16 bits (default : none) </td><td class="markdownTableBodyLeft">Listener unique ID list. Used only in fast-connect mode.  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">channel_waitmask </td><td class="markdownTableBodyLeft">bitmask, between 0 and 7 included. default: 0 </td><td class="markdownTableBodyLeft">The stack waits for the specified control channels to be opened by the application before starting AVDECC for the entity: bit 0 =&gt; MEDIA_STACK channel, bit 1 =&gt; CONTROLLER channel, bit 2 =&gt; CONTROLLED channel.  </td></tr>
</table>
<h3><a class="anchor" id="autotoc_md117"></a>
Section [AVB_AVDECC_ENTITY_2]</h3>
<p>It is possible to define a second AEM entity on the same node. If used, the second entity can only be an AVDECC controller. </p><table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Key </th><th class="markdownTableHeadLeft">Value &amp; Range </th><th class="markdownTableHeadLeft">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">entity_file </td><td class="markdownTableBodyLeft">Text string. Format: /etc/genavb/controller.aem (default : none) </td><td class="markdownTableBodyLeft">File to be used as AVDECC AEM entity description.  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">channel_waitmask </td><td class="markdownTableBodyLeft">bitmask, between 0 and 7 included. default: 0 </td><td class="markdownTableBodyLeft">The stack waits for the specified control channels to be opened by the application before starting AVDECC for the entity: bit 0 =&gt; MEDIA_STACK channel, bit 1 =&gt; CONTROLLER channel, bit 2 =&gt; CONTROLLED channel.  </td></tr>
</table>
<h3><a class="anchor" id="autotoc_md118"></a>
Section [AVB_MSRP]</h3>
<p>MSRP stack component configuration</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Key </th><th class="markdownTableHeadLeft">Value &amp; Range </th><th class="markdownTableHeadLeft">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">declare_listener_asking_failed </td><td class="markdownTableBodyLeft">0 or 1 (default 0) </td><td class="markdownTableBodyLeft">Enables declaration of MSRP Listener attributes with a LISTENER_ASKING_FAILED value (as opposed to simply stop declaring the Listener attribute). 0 - disabled, 1 - enabled.  </td></tr>
</table>
<h3><a class="anchor" id="autotoc_md119"></a>
Custom AEM parameters</h3>
<p>Except for a few specific items, all the fields of an AEM entity take their value from the AEM entity description file (see section 4 below).The parameters that behave differently are:</p><ul>
<li>the association ID</li>
<li>the entity ID</li>
<li>the entity model ID</li>
</ul>
<h4><a class="anchor" id="autotoc_md120"></a>
Association ID</h4>
<p>If the association_id parameter of the [AVB_AVDECC] section of the configuration file is set to a non-zero value, it will override any value set in the AEM definition files, for all entities on the endpoint. If it is unset or 0, the value stored in each entity AEM definition file will be used instead.</p>
<blockquote class="doxtable">
<p>For each entity, a non-zero association_id value remains dependent on the ADP_ENTITY_ASSOCIATION_ID_SUPPORTED flag being set in the entity_capabilities field of the AEM definition file. If that flag isn't set, the association_id will be forced to 0 at init time. The ADP_ENTITY_ASSOCIATION_ID_VALID flag will also be set or cleared at init time, based on the value of the assocation_id field (independently of the initial value stored in the AEM definition file). </p>
</blockquote>
<h4><a class="anchor" id="autotoc_md121"></a>
Entity ID</h4>
<p>The entity ID will be set according to the following, in decreasing order of priority:</p><ul>
<li>the entity_id parameter of the [AVB_AVDECC_ENTITY_n] section of the configuration file, if it is set and non-zero,</li>
<li>the entity ID value stored in the AEM definition file, if it is non-zero,</li>
<li>a dynamic value computed from the Freescale OUI-24 (00:04:9f), the last 3 bytes of the eth0 MAC address, and the entity index on the endpoint (0 or 1).</li>
</ul>
<p>(so the configuration file value, if present, will override any value which may have been set otherwise).</p>
<blockquote class="doxtable">
<p>To ensure uniqueness, the entity ID shall be set by the entity manufacturer using an EUI block that it owns. </p>
</blockquote>
<h4><a class="anchor" id="autotoc_md122"></a>
Entity model ID</h4>
<p>The entity model ID will be set to:</p><ul>
<li>the entity model ID stored in the AEM definition file, if it is non-zero,</li>
<li>the entity ID value otherwise.</li>
</ul>
<hr  />
<h1><a class="anchor" id="autotoc_md124"></a>
Defining an AVDECC entity description</h1>
<p>The current descriptions are using the following:</p>
<p>Audio characteristics:</p><ul>
<li>AVTP Format IEC 61883-6 AM824 or AAF Format (when specified)</li>
<li>2 audio channels</li>
<li>48 KHz sample rate</li>
<li>24 bits</li>
</ul>
<p>Video characteristics:</p><ul>
<li>AVTP Format IEC 61883-4</li>
<li>MPEG2-TS compressed audio/video</li>
<li>Maximum bit rate 24Mbps</li>
</ul>
<p>The pre-defined descriptions files are as follows:</p>
<ul>
<li>Audio talker/listener, single stream<ul>
<li>AVDECC Entity configuration file: listener_talker_audio_single.aem</li>
</ul>
</li>
<li>Audio listener, single stream<ul>
<li>AVDECC Entity configuration file: listener_audio_single.aem</li>
</ul>
</li>
<li>Audio talker, single stream<ul>
<li>AVDECC Entity configuration file: talker_audio_single.aem</li>
</ul>
</li>
<li>Audio talker + listener, multiple streams (8 + 8 streams)<ul>
<li>AVDECC Entity configuration file: talker_listener_audio_multi.aem</li>
</ul>
</li>
<li>Audio talker + listener, multiple streams, AAF format (8 + 8 streams)<ul>
<li>AVDECC Entity configuration file: talker_listener_audio_multi_aaf.aem</li>
</ul>
</li>
<li>Audio/Video listener, single stream<ul>
<li>AVDECC Entity configuration file: listener_video_single.aem</li>
</ul>
</li>
<li>Audio/Video talker, single stream<ul>
<li>AVDECC Entity configuration file: talker_video_single.aem</li>
</ul>
</li>
<li>Raw Audio + MPEG2-TS talker, dual stream<ul>
<li>AVDECC Entity configuration file: talker_audio_video.aem</li>
</ul>
</li>
<li>Controller<ul>
<li>AVDECC Entity configuration file: controller.aem</li>
</ul>
</li>
</ul>
<h3><a class="anchor" id="autotoc_md125"></a>
AEM configuration file format</h3>
<p>The AVDECC entity description is stored in some AEM configuration files, used to set the capabilities of the AVB node. The binary format of the AEM file is as follows. The file starts with a fixed header with information on the number of each descriptor type, present in the file, and their size. All descriptors of a given type have the same size. There are 38 types of descriptors as specified in IEEE Std 1722.1-2013, section 7.2.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">offset (bytes) </th><th class="markdownTableHeadCenter">width (bytes) </th><th class="markdownTableHeadCenter">Descriptor type </th><th class="markdownTableHeadCenter">name </th><th class="markdownTableHeadCenter">endianess  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyCenter">2 </td><td class="markdownTableBodyCenter">0 </td><td class="markdownTableBodyCenter">size_0 (bytes) </td><td class="markdownTableBodyCenter">LE  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">2 </td><td class="markdownTableBodyCenter">2 </td><td class="markdownTableBodyCenter">0 </td><td class="markdownTableBodyCenter">total_0 </td><td class="markdownTableBodyCenter">LE  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">4 </td><td class="markdownTableBodyCenter">2 </td><td class="markdownTableBodyCenter">1 </td><td class="markdownTableBodyCenter">size_1 (bytes) </td><td class="markdownTableBodyCenter">LE  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">6 </td><td class="markdownTableBodyCenter">2 </td><td class="markdownTableBodyCenter">1 </td><td class="markdownTableBodyCenter">total_1 </td><td class="markdownTableBodyCenter">LE  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">... </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">-  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">37 * 4 </td><td class="markdownTableBodyCenter">2 </td><td class="markdownTableBodyCenter">37 </td><td class="markdownTableBodyCenter">size_37 (bytes) </td><td class="markdownTableBodyCenter">LE  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">37 * 4 + 2 </td><td class="markdownTableBodyCenter">2 </td><td class="markdownTableBodyCenter">37 </td><td class="markdownTableBodyCenter">total_37 </td><td class="markdownTableBodyCenter">LE  </td></tr>
</table>
<p>This header is followed by the actual descriptors. All descriptors follow the format described in IEEE Std 1722.1-2013 section 7.2. If the total number of descriptors is 0, for a given descriptor type, the descriptor is skipped. For variable sized descriptors there may be more space used in the file than required in memory.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">offset (bytes) </th><th class="markdownTableHeadCenter">width (bytes) </th><th class="markdownTableHeadCenter">Descriptor type </th><th class="markdownTableHeadCenter">Descriptor Number  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">152 </td><td class="markdownTableBodyCenter">size_0 </td><td class="markdownTableBodyCenter">0 </td><td class="markdownTableBodyCenter">0  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">152 + size_0 </td><td class="markdownTableBodyCenter">size_0 </td><td class="markdownTableBodyCenter">0 </td><td class="markdownTableBodyCenter">1  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">... </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">-  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">152 + (total_0 - 1) * size_0 </td><td class="markdownTableBodyCenter">size_0 </td><td class="markdownTableBodyCenter">0 </td><td class="markdownTableBodyCenter">total_0 - 1  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">152 + total_0 * size_0 </td><td class="markdownTableBodyCenter">size_1 </td><td class="markdownTableBodyCenter">1 </td><td class="markdownTableBodyCenter">0  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">152 + total_0 * size_0 + size_1 </td><td class="markdownTableBodyCenter">size_1 </td><td class="markdownTableBodyCenter">1 </td><td class="markdownTableBodyCenter">0  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">... </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">- </td><td class="markdownTableBodyCenter">-  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">152 + total_0 * size_0 + (total_1 - 1) * size_1 </td><td class="markdownTableBodyCenter">size_1 </td><td class="markdownTableBodyCenter">1 </td><td class="markdownTableBodyCenter">total_1 - 1  </td></tr>
</table>
<hr  />
<h1><a class="anchor" id="autotoc_md127"></a>
AVB Startup Options</h1>
<p>The AVB stack accepts command line options which are documented in this section.</p>
<ul>
<li>-v displays program version</li>
<li>-f &lt;conffile&gt; path and filename to read configuration from (eg: /etc/genavb/genavb-listener.cfg)</li>
<li>-h prints help text</li>
</ul>
<hr  />
<h1><a class="anchor" id="autotoc_md129"></a>
Endpoint, entity and application constraints</h1>
<p>The AVB stack currently supports the following AVDECC roles:</p><ul>
<li>talker (both for streaming and control),</li>
<li>listener(both for streaming and control),</li>
<li>controller.</li>
</ul>
<p>A single entity can combine several of these roles. On a Linux endpoint, those roles may be handled by one or several applications using the AVB stack API, but channel communication constraints between the stack and the applications impose the following rules:</p><ul>
<li>genavb_control_open(.., .., AVB_CTRL_AVDECC_CONTROLLER) may only be called once (there can be only a single open instance in the entire system),</li>
<li>genavb_control_open(.., .., AVB_CTRL_AVDECC_CONTROLLED) may only be called once (there can be only a single open instance in the entire system),</li>
<li>genavb_control_open(.., .., AVB_CTRL_AVDECC_MEDIA_STACK) may only be called once (there can be only a single open instance in the entire system),</li>
<li>a single control channel instance (opened with ::avb_control_open) may only handle a single entity.</li>
</ul>
<p>If we translate those rules in terms of entities, this means we are currently limited to at most 2 entities per endpoint:</p><ul>
<li>one being a streaming entity (talker, listener, or a single entity with both roles),</li>
<li>one being a controller. Having more than 2 is not possible, and having one talker and one listener or 2 talkers, or 2 listeners, or 2 controllers isn't either.</li>
</ul>
<p>Examples:</p><ul>
<li>one listener entity, 1 streaming application, 1 controlled application =&gt; OK</li>
<li>one listener entity, one controller entity, 1 streaming application, 1 controller and controlled application =&gt; OK</li>
<li>one talker/listener entity, 1 application handling listener and talker streams as well as the controlled role =&gt; OK</li>
<li>one talker entity, 1 application handling streaming, 2 applications for control =&gt; INCORRECT</li>
<li>one talker/listener entity, 1 application for talker streams, one for listener streams =&gt; INCORRECT</li>
<li>one talker entity, one controller entity, 1 application for talker streams, 1 for talker control, 1 for controller =&gt; OK</li>
<li>one talker entity, one listener entity, any application combination =&gt; INCORRECT</li>
<li>one listener/talker entity, one controller entity, one application handling everything =&gt; OK</li>
<li>one listener/talker/controller entity, one application handling everything =&gt; OK</li>
</ul>
<p>Note: For extra correctness, one "application" in this context should actually be understood as one instance of the AVB library, as created by genavb_init. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer"> &copy; 2017-2020 NXP
    </li>
  </ul>
</div>
</body>
</html>
